using System.Text;

namespace my_newconsole;

/// <summary>
/// 格式化xml时，可设置encoding的类
/// </summary>
public sealed class StringWriterWithEncoding : StringWriter
{
    private readonly Encoding encoding;

    public StringWriterWithEncoding(Encoding encoding)
    {
        this.encoding = encoding;
    }

    public override Encoding Encoding
    {
        get => encoding;
    }
}
